From 8d170a29890ec7eb6ac2c28cce5fe6ffcb359164 Mon Sep 17 00:00:00 2001 From: "emellor@ewan" Date: Fri, 30 Sep 2005 11:55:49 +0100 Subject: [PATCH] Added cache-control headers to pages returned by HTTP server so that pages expire immediately. This prevents navigation to stale pages. Signed-off-by: Ewan Mellor --- tools/python/xen/web/http.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/python/xen/web/http.py b/tools/python/xen/web/http.py index 5cabb95e24..e11d8d29bd 100644 --- a/tools/python/xen/web/http.py +++ b/tools/python/xen/web/http.py @@ -437,6 +437,9 @@ class HttpRequest: send_body = self.hasBody() if not self.close_connection: self.setResponseHeader("Connection", "keep-alive") + self.setResponseHeader("Pragma", "no-cache") + self.setResponseHeader("Cache-Control", "no-cache") + self.setResponseHeader("Expires", "-1") if send_body: self.output.seek(0, 0) body = self.output.getvalue() -- 2.30.2